-
Notifications
You must be signed in to change notification settings - Fork 67
K8SPG-637: disable restore on pg-restore deletion
#950
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
inelpandzic
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pooknull pls check these tests
hors
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have the same issue with backups as well. I will create separate task to fix it.
| if checkBackupJob(job) != v2.BackupSucceeded { | ||
| if err := c.Delete(ctx, job); err != nil { | ||
| return nil, errors.Wrap(err, "delete pg-backup job") | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we delete the backup job?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleting job might make debugging hard for users
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commit: f21b507 |
https://perconadev.atlassian.net/browse/K8SPG-637
DESCRIPTION
Problem:
If user deletes
pg-restorebefore it fails or succeeds, the operator doesn't remove.spec.backup.restorefrompg.Solution:
Add the
percona.com/delete-restorefinalizer to the newpg-restoreobjects, which will remove the required section on deletion ofpg-restoreif it didn't fail or succeed.This PR also fixes
K8SPG-700, by addingpercona.com/delete-backupfinalizer to the newpg-backupobjects. This finalizer will delete backup annotations from cr.CHECKLIST
Jira
Needs Doc) and QA (Needs QA)?Tests
Config/Logging/Testability